import request from '@/router/axios';
/* 详情 */
export const apiDetail = (params) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/detail',
    method: 'get',
    params
  })
}

// 分页
export const apiList = (current, size,params) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/list',
    method: 'get',
    params: {
      current,
      size,
      ...params
    }
  })
}

/* 上下架 */
export const apiIsOn = (row) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/gsOn',
    method: 'post',
    data: row
  })
}

/* 新增或修改 */
export const apiAdd = (row) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/submit',
    method: 'post',
    data: row
  })
}

/* 删除 */
export const apiDel = (ids) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/remove',
    method: 'post',
    params: {ids}
  })
}

/* 规格删除 */
export const apiGGDel = (params) => {
  return request({
    url: '/api/rb-oem/oem/mall/mall_product/removeSpe',
    method: 'post',
    params
  })
}

